package player;

import java.util.ArrayList;

import powers.Power;
import virtualTabletop.Position;
import virtualTabletop.TargetType;
import Items.Weapon;
import abilities.Abilities;
import abilities.Ability;
import character.Alignment;
import character.Resistance;
import character.Team;
import feats.Feat;

/**
 * enum to make player characters
 * 
 * @author bjo013
 * 
 */
public class PlayerCharacter extends character.Character
{

	int level = 1;
	int gatheredXP;
	PlayerClass playerClass;
	Race race;
	ArrayList<Feat> feats;
	String playerName;
	String charFluff;

	/**
	 * The constructor for a player
	 * 
	 * @param level
	 *            the level of a player
	 * @param playerClass
	 *            the class of the player
	 * @param race
	 *            the race of the player
	 * @param abilities
	 *            the abilities of the player
	 * @param AC
	 *            the AC of the player
	 * @param Fort
	 *            the fortitude of the player
	 * @param Ref
	 *            the reflex of the player
	 * @param Will
	 *            the will of the player
	 * @param powers
	 *            the powers of the player
	 * @param actionPoints
	 *            the action points the player may have
	 * @param savingThrowBonus
	 *            the saving throw bonus of the player
	 * @param alignment
	 *            the alignment of the player
	 * @param feats
	 *            the feats of the player
	 * @param charName
	 *            the name of the character
	 * @param playerName
	 *            the name of whomever is playing
	 * @param charFluff
	 *            extra information about the player
	 * @param mainweapon
	 *            the players main weapon
	 * @param pos
	 *            the position of the player
	 * @param sprite
	 *            the sprite of the player
	 */
	public PlayerCharacter(int level, PlayerClass playerClass, Race race,
			Abilities abilities, int[] AC, int[] Fort, int[] Ref, int[] Will,
			ArrayList<Power> powers, int actionPoints, int savingThrowBonus,
			Alignment alignment, ArrayList<Feat> feats, String charName,
			String playerName, String charFluff, Weapon mainweapon,
			Position pos, String sprite)
	{
		super(playerClass.hp + abilities.getCON() + playerClass.hpprlvl
				* (level - 1), playerClass.healingsurges
				+ abilities.getStatMod(Ability.CON), abilities, AC, Fort, Ref,
				Will, powers, race.speed, actionPoints, savingThrowBonus,
				race.size, new ArrayList<Resistance>(), alignment, abilities
						.getStatMod(Ability.DEX), TargetType.You, mainweapon,
				pos, charName, Team.players, sprite);

		this.playerClass = playerClass;
		this.race = race;
		this.feats = feats;
		this.playerName = playerName;
		this.charFluff = charFluff;

		// ombestemt meg, gjøres utenfor klassen når de blir opprettet
		// doExtraRacials();
	}

	/*
	 * private void doExtraRacials() { Power power = new Power();
	 * switch(race.race) { case Dragonborn:
	 * this.hp.setSurgesPrDay(this.hp.getSurgesPrDay() +
	 * abilities.getStatMod(Ability.CON));
	 * 
	 * power = new Power("Dragon Breath", Flavor.Encounter, PowerSource.Primal,
	 * DamageType.Poison, EffectType.Poison, null, ActionType.Minor,
	 * AttackType.CloseBurst, 3, 0, TargetType.Creature, new
	 * AttackVs(Ability.STR, Defense.Ref, 2), 1, new Hit(1, Die.d6,
	 * this.abilities.getStatMod(Ability.CON), Ability.CON), false, null, 0);
	 * //Dragonborn Fury???? break;
	 * 
	 * case Dwarf: break; case Eladrin: break; case Elf: break; case HalfElf:
	 * break; case Halfling: break; case Human: break; case Tiefling: break;
	 * default: System.out.print("THIS IS SPARTA!! Also, class doesn't exist.");
	 * }
	 * 
	 * this.powers.add(power); }
	 */
}
